#ifdef GL_ES
precision mediump float;
#endif

uniform float u_time;
uniform vec2 u_resolution;
uniform vec2 u_mouse;

float plot(float x,float y){
    return smoothstep(0.,.02,abs(y-x));
}

float plot2(vec2 st,float pct){
    return smoothstep(pct-.01,pct,st.y)-
    smoothstep(pct,pct+.01,st.y);
}

void main(){
    
    vec2 st=gl_FragCoord.xy/u_resolution;
    float y= sign(st.x - 0.5) * 0.5;
    // float x =  smoothstep(0.1,0.9,st.x);
    // float x=smoothstep(.4,.5,st.x)-smoothstep(.5,.6,st.x);
    float pct=plot2(st,y);
    
    vec3 green=vec3(0.,1.,0.);
    vec3 bgColor=vec3(0.);
    vec3 finalColor=(1.-pct)*bgColor+pct*green;
    gl_FragColor=vec4(finalColor,1.);
    
}